<template>
    <div>
        <div class="breadcrumb">
            <el-breadcrumb separator-class="el-icon-arrow-right">
                <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
                <el-breadcrumb-item>差假管理</el-breadcrumb-item>
                <el-breadcrumb-item>审核</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <hr style="border: 1px solid #F2F6FC;">
        <el-menu class="el-menu-demo" mode="horizontal" @select="handleSelect" background-color="#545c64" text-color="#fff"
            active-text-color="#ffd04b" :router="true" default-active="/lb/ac/al">
            <el-menu-item index="/lb/ac/al">审核请假</el-menu-item>
            <el-menu-item index="/lb/ac/ab">审核出差</el-menu-item>
        </el-menu>
        <el-container>
            <el-main><router-view></router-view></el-main>
        </el-container>
    </div>
</template>

<script>
import { getRoleById, clearUnreadMsg } from '@/api/api'
export default {
  data () {
    return {
    }
  },
  methods: {
    handleSelect (key, keyPath) {
      console.log(key, keyPath)
    }
  },
  mounted () {
    getRoleById().then(res => {
      // console.log(res.data)
      if (res.data.data.roleId !== 3) {
        clearUnreadMsg(this.$store.state.userId).then(res => {
          console.log(res.data)
        })
      }
    })
  }
}
</script>

<style lang="scss" scoped>
.breadcrumb {
    margin: 0px 0px 20px 0px;
}
</style>
